import dt from '@dt/dt'
// import table from '@/components/dt/table/render.js'
import table from '@/components/dt/table/render.js'
// import nameOpt from '@/biz/option/name.js'

function options1(_this, isAudit = false) {
  return [

    {
      title: '序号',
      type: 'index',
      minWidth: 60,
    },
    {
      title: '产品名称',
      field: 'productName',
      minWidth: 120,
    },
    {
      title: '房源名称',
      field: 'roomName',
      minWidth: 120,
    },
    {
      title: '工号',
      field: 'workNo',
      minWidth: 120,
    },
    {
      title: '姓名',
      field: 'userName',
      minWidth: 120,
    },
    {
      title: '岗位',
      field: 'postName',
      minWidth: 120,
    }, {
      title: '职级',
      field: 'rankName',
      minWidth: 120,
    },

    {
      title: '应付奖金（元）',
      field: 'bonusMoney',
      minWidth: 120,


      cell: (info) => {
        return {
          edit: {
            key: 'bonusMoney',
            placeholder: '请输入',
            input: {
              type: 'number',
              blur: (val) => {
                if (val === '') {
                  _this.$Message.error('应付奖金不能为空。')
                  return false
                }
                console.log(info, 'inininininin');
                _this.updatebonusMoney(val, info)

              },
            },
          }
        }
      },
    },

    {
      title: '操作',
      key: '',
      fixed: 'right',
      width: 180,
      align: 'center',
      cell: (row) => {
        return {
          btn: [{
            title: '删除',
            event: 'detailsDelete',
          }]
        }
      }
    },
  ]
}

function options2(_this, isAudit = false) {
  return [{
    title: '序号',
    type: 'index',
    minWidth: 120,
  },
  {
    title: '工号',
    field: 'workNo',
    minWidth: 120,
  },
  {
    title: '姓名',
    field: 'userName',
    minWidth: 120,
  }, {
    title: '在职状态',
    field: 'jobStatusStr',
    minWidth: 120,
  },
  {
    title: '岗位',
    field: 'postName',
    minWidth: 120,
  }, {
    title: '应付奖金（元）',
    field: 'bonusMoney',
    minWidth: 120,
  }, ]
}
export default {
  options1,
  options2,

}